import http from "./request";
async function getDefaultAdress() {
  let { data } = await http.get(
    "/user/shipping-address/default?token=" + localStorage.getItem("token")
  );
  return data;
}
//获取默认地址

async function addAddress(params) {
  let { data } = await http.post(
    `/user/shipping-address/add?linkMan=${params.linkMan}&code=${params.code}&provinceId=${params.provinceId}&cityId=${params.cityId}&mobile=${params.mobile}&token=${params.token}&address=${params.address}`
  );
  return data;
}
//添加地址

export { getDefaultAdress, addAddress };
